Add Local Seller Address
Method: POST
/api/v1/local-sellers/{localSellerId}/address
Description
This endpoint adds an address for a specific local seller (e.g., farmer or merchant). It allows users to associate multiple addresses with a local seller, along with additional documentation and location details.
🔑 Authentication
This endpoint requires authentication via headers.
| Param | Value | Type |
|---|---|---|
tenantId | {{tenantId}} | string |
userId | {{userId}} | string |
countryCode | {{countryCode}} | string (optional) |
Path Parameter
| Name | Type | Description |
|---|---|---|
localSellerId | string | The unique ID of the local seller. |
Request Body
{
"addresses": [
{
"docLinks": [
{
"name": "SUSTAINABILITY",
"esgRequirement": "LABOR_PRACTICES",
"status": "NON_COMPLIANT",
"link": "https://example.com/document.pdf",
"hasSignOfDeforestation": false,
"isProtectedArea": false
}
],
"name": "Primary Farm",
"address": "123 Farm Road",
"country": {
"name": "Nigeria",
"code": "NG",
"currency": "NGN"
},
"state": {
"name": "Lagos",
"code": "LA"
},
"lga": {
"name": "Ikeja",
"code": "IK"
},
"latitude": 6.5244,
"longitude": 3.3792,
"location": {
"type": "Point",
"coordinates": [
"3.3792",
"6.5244"
]
},
"size": 10
}
],
"userId": "user123",
"tenantId": "tenant123"
}
Request Body Explanation
| Name | Type | Description |
|---|---|---|
addresses | array | List of addresses associated with the local seller. |
addresses[].docLinks | array | Links to ESG compliance documents. |
addresses[].docLinks[].name | string | The name of the document (e.g., "SUSTAINABILITY"). |
addresses[].docLinks[].esgRequirement | string | ESG category (e.g., "LABOR_PRACTICES"). |
addresses[].docLinks[].status | string | Compliance status (e.g., "NON_COMPLIANT"). |
addresses[].docLinks[].link | string | A URL linking to the document. |
addresses[].docLinks[].hasSignOfDeforestation | boolean | Indicates if deforestation signs were detected. |
addresses[].docLinks[].isProtectedArea | boolean | Indicates if the location is a protected area. |
addresses[].name | string | The name or description of the address (e.g., "Primary Farm"). |
addresses[].address | string | The full physical address. |
addresses[].country | object | Country information (name, code, currency). |
addresses[].state | object | State information (name, code). |
addresses[].lga | object | Local Government Area details (name, code). |
addresses[].latitude | number | Latitude of the address location. |
addresses[].longitude | number | Longitude of the address location. |
addresses[].location | object | GeoJSON-style location information (type and coordinates). |
addresses[].size | number | The size of the location (e.g., farm size in hectares). |
userId | string | The ID of the user submitting the address. |
tenantId | string | The ID of the tenant associated with the local seller. |
Response: 201 Created
{
"message": "Address added successfully.",
"sellerId": "12345",
"addresses": [
{
"name": "Primary Farm",
"address": "123 Farm Road",
"country": {
"name": "Nigeria",
"code": "NG",
"currency": "NGN"
},
"state": {
"name": "Lagos",
"code": "LA"
},
"lga": {
"name": "Ikeja",
"code": "IK"
},
"latitude": 6.5244,
"longitude": 3.3792,
"size": 10
}
]
}
LANGUAGE
CURL REQUEST
curl --request POST \
--url /api/v1/local-sellers/{localSellerId}/address \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!